package cn.topcodes.tcsf.wechat.domain.entity;

import cn.topcodes.tcsf.admin.commons.domain.IdEntity;
import lombok.Data;

import javax.persistence.Table;
import java.util.Date;

/**
 * 微信模板消息推送日志 实体
 * @author xw
 * @date 2018-01-08 10:11:16
 */
@Data
@Table(name = "t_wechat_push_log")
public class WechatPushLog extends IdEntity {

    public static final String FIELD_TO_USER = "toUser";

    public static final String FIELD_CONTENT = "content";

    public static final String FIELD_TIME = "time";

    public static final String FIELD_STATE = "state";

    public static final String FIELD_REASON = "reason";

    public static final String FIELD_WECHAT_MP_ID = "wechatMpId";

    public static final String FIELD_MSG_ID = "msgId";

    /**
     * 消息发送状态, 成功与否
     */
    public static final String TYPE_ALL = "All";
    public static final String TYPE_TRUE = "True";
    public static final String TYPE_FALSE = "False";

    /**
     * 目标用户openId
     */
    private String toUser;

    /**
     * 内容
     */
    private String content;

    /**
     * 发送时间
     */
    private Date time;

    /**
     * 发送状态
     */
    private String state;

    /**
     * 原因描述
     */
    private String reason;

    /**
     * 公众号id
     */
    private Long wechatMpId;

    /**
     * 模版消息ID
     */
    private Long msgId;
}
